package com.zjw.core.algorithm;

import java.util.PriorityQueue;
import java.util.Queue;

public class QueueTest {
    public static void main(String[] args) {
        int[] num = new int[20];
        Queue<Integer> queue = new PriorityQueue<>();
        for (int i = 0; i < 20; i++) {
            num[i] = (int) (Math.random()* 500);
            queue.add(num[i]);
             System.out.print(num[i] + " ");
        }
        System.out.println("");
        System.out.println(queue.toString());
    }
}
